<?php /* Widget Title: Travel Deals from */ ?>

<?php
/* Widget Content */

$Record = new Pod('brand');
$Record->page = 1;
$Record->search = false;
$Record->findRecords("t.id DESC", -1, "t.brandurl IN('goibibo','yatra-com','cleartrip-com','easemytrip-com','travelguru','akbartravelsonline-com','expedia','jet airways')");
while($Record->fetchRecord()){
	$brand_name = $Record->get_field('name');
	$brandurl = $Record->get_field('brandurl');
	$logo = $Record->get_field('logo');
	$small_image =  wp_get_attachment_image_src($logo[0][ID], 'thumbnail', false);
	$logo = $small_image[0];
	$webpage = $Record->get_field('webpage');
	
	if(!empty($logo)){
	  echo '<div style="float:left;margin-right:10px;"><a href="'.$webpage.'"><img src="'.$logo.'" alt="'.$brand_name.' Offers" /></a></div>';
	}
}
echo '<div style="clear: both;"></div>';

/* Widget Content */
?>

<?php
/* Widget Logic */ 
is_pod_page('c-vacation-offers') || is_pod_page('c-hotel-offers') || is_pod_page('c-flight-offers') || is_page('c-travel-offers')
/* Widget Logic */ 
?>